import { Component, Input } from '@angular/core';
import { PurchaseService } from 'src/app/@core/services/purchase/purchase.service';

@Component({
  selector: 'app-product-inspection-details',
  templateUrl: './product-inspection-details.component.html',
  styleUrls: ['./product-inspection-details.component.scss']
})
export class ProductInspectionDetailsComponent {
  @Input() data:any
    tempData: any;
    items: any[] = [
      '检验合格','检验不合格'
    ];
    item: string = '检验合格';
    constructor(private PurchaseService:PurchaseService) { }
    ngOnInit(): void {
      this.tempData = JSON.parse(JSON.stringify(this.data));
      this.tempData.data.inspectionResult = '检验合格';
      // this.PurchaseService.GetInspectionOrderTemporaryByNum(this.tempData.data.purchaseInspectionOrderNum).subscribe((res: any) => {
      //   this.tempData.data.unqualifiedQuantity = res.unqualifiedQuantity;
      //   this.tempData.data.qualifiedQuantity = res.qualifiedQuantity;
      // });
    }
    valueChange($event:any){
      this.tempData.data.inspectionResult = $event;
      console.log(this.tempData.data.inspectionResult);
    }
}
